import Vue from 'vue'
import App from './App.vue'
import router from './router.js'
import './plugins/element.js'
import "bootstrap"
import "@/common/zcm-main.css"
import animate from 'animate.css'
import store from './store/modules/data_create.js'
import {Message} from 'element-ui'


Vue.use(animate)


Vue.config.productionTip = false

new Vue({
	store,
	router,
	render: h => h(App),
	
}).$mount('#app')



window.addEventListener("message", function (ev) {
    
	
	 //有很多种系统消息，然后排出这些系统消息以免触发跳转造成无限跳转
	if(!ev.data.type && ev.data.url && !ev.data.source){
	
		window.sessionStorage.setItem('token',ev.data.token)
		window.sessionStorage.setItem('user',JSON.stringify(ev.data))
		parent.location.href=ev.data.url
		window.removeEventListener('message')
	} 
  
  }, false);
  
  